-
Notifications
You must be signed in to change notification settings - Fork 0
Replace gulp-sass-lint with gulp-postcss / stylelint #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the unmaintained gulp-sass-lint package with a modern stylelint-based linting solution using gulp-postcss and stylelint. The change includes a default configuration that disables many rules to maintain compatibility with existing projects while allowing individual plugins to override settings via their own .stylelintrc.json files.
Changes:
- Removed dependency on deprecated
gulp-sass-lintand addedstylelint,postcss-scss, and related packages - Updated the SCSS linting task to use postcss pipeline with stylelint
- Added a default stylelint configuration with many rules disabled for backward compatibility
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/lint.js | Updated lintScssTask to use postcss/stylelint instead of gulp-sass-lint, with support for custom config files |
| package.json | Removed gulp-sass-lint dependency and added stylelint, postcss-scss, and stylelint-config-standard-scss |
| lib/lintfiles/.stylelintrc.json | Added default stylelint configuration extending standard SCSS config with many rules disabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments on things we could clean up, but no major concerns. Completed QA on Memberships without issue, and I also confirmed I was able to override rules with the addition of .stylelintrc.json file 👍 Love having a --fix command! 🚀
nikolas4175-godaddy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All questions addressed 👍
Issue: https://godaddy-corp.atlassian.net/browse/MWC-17960
Summary
This replaces the unmaintained
gulp-sass-lintwithgulp-postcss/stylelint. It also adds a lint config, which disables a ton of rules just to avoid suddenly switching to this method and ending up with a ton of warnings you didn't have before. IMO it's up to individual plugins to override these lint rules (supported).To override:
Create a new
.stylelintrc.jsonfile in plugin directory with desired rules.Update sake config:
This change also supports fixing lint errors with a
--fixflag.QA
sake lint:scsssake compile:scsssake lint:scss --fix-- QA for this step onwards only works if you had at least 1 lint error, which csv export doesgit statusgit diffHere's an output of the changes from
woocommerce-customer-order-csv-export:and
$git diff(truncated)After merge